package com.hjl.servlet2;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import java.io.IOException;

/**
 * @author ServivE
 * @version 0.1
 * @className LifeServlet
 * @description
 * @date 2024/7/25 21:30
 * @since jdk11
 */
@WebServlet("/lifeservlet")
public class LifeServlet extends HttpServlet {
    public LifeServlet(){
        System.out.println("1.实例化");
    }
    public void init(ServletConfig servletConfig) throws ServletException {
        System.out.println("2.初始化");
    }

    public ServletConfig getServletConfig() {
        return null;
    }

    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("3.接受请求，响应结果");
    }

    public String getServletInfo() {
        return null;
    }

    public void destroy() {
        System.out.println("4.销毁");
    }
}
